<div class="pt15 pl15">当前位置：<span class="layui-breadcrumb"><a href="/">首页</a><a href="/admin/sys-source/index">资源管理</a><a><cite>编辑资源</cite></a></span></div>
<div class="layui-fluid">
    <div class="layui-card p30">		
		<div class="border-b pb15 f22">编辑资源</div>
		<form class="layui-form" action="/admin/sys-source/update">
		<input type="hidden" name="id" value="<?=$model->id?>"/>
		<div class="layui-card-body pt30 pb15">		
			<div class="layui-container">
				<div class="layui-row">
					<div class="layui-col-xs12 layui-col-md6">	
						<div class="layui-form-item">
							<label class="layui-form-label">资源名称：</label>
							<div class="layui-input-block">
							  <input type="text" name="name" id="name" value="<?= $model->name;?>" required  lay-verify="required" placeholder="请输入资源名称"  class="layui-input">
							</div>
						</div>				
					    <div class="layui-form-item">
							<label class="layui-form-label">父级分类：</label>
							<div class="layui-input-block">
								<select name="parent" id="parent">
									<option value="0">选择上级菜单</option>
									<?php foreach($top_source as $parent){?>
									<option value="<?=$parent['id']?>" <?= $model->parent==$parent['id'] ? 'selected':'';?> ><?=$parent['name']?></option>
									<?php }?>
								</select>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">是否菜单：</label>
							<div class="layui-input-block">     
							  <select name="ismenu" id="ismenu">
								<option value="0" <?= $model->ismenu==0 ? 'selected':'';?>>否</option>
								<option value="1" <?= $model->ismenu==1 ? 'selected':'';?>>是</option>
							  </select>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">url链接：</label>
							<div class="layui-input-block">
							  <input type="text" name="url" id="url" value="<?= $model->url;?>" required  lay-verify="required" placeholder="请输入url链接" class="layui-input">
							</div>
						</div>  
					</div>				
				</div>       
			</div>
		</div>		
		<div class="pt30 border-t text-c"> 
			<button type="submit" class="layui-btn layui-btn-normal">提交</button>
			<a class="layui-btn layui-btn-primary" href="/admin/sys-source/index">取消</a>					
		</div>		
		</form>		
    </div>
</div>